<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no"/>
    <meta name="format-detection" content="email=no"/>
    <title>首页-品牌选择</title>
    <link rel="stylesheet" href="../../css/api.css">
    <link rel="stylesheet" href="../../css/main.css">
    <link rel="stylesheet" href="../../css/mint.css">
    <style>
        img{
            width: .6rem;
            height: .25rem;
        }
        .mint-indexlist-content{
            -webkit-overflow-scrolling: touch;
        }
    </style>
</head>

<body>
<div class="app" v-cloak>
    <mt-index-list v-if="isShow">
        <mt-index-section :index="item.index" v-for="(item,index) in brandList" :key="index">
            <div  @click.stop="selectBrand(it)" v-for="(it,idx) in item.list" :key="idx">
                <mt-cell :title="it.title">
                    <img :src="it.img" alt="" >
                </mt-cell>
            </div>
        </mt-index-section>
      </mt-index-list>
</div>
<script src="../../script/api.js "></script>
<script src="../../script/flexible.js "></script>
<script src="../../script/fastclick.js "></script>
<script src="../../script/vue.min.js "></script>
<script src="../../script/iconfont.js "></script>
<script src="../../script/common.js"></script>
<script src="../../script/restful.js"></script>
<script src="../../script/businessCommon.js"></script>
<script src="../../script/mint.js"></script>

<script>
    apiready = function () {
        var listContact
        var vm = new Vue({
            el: '.app',
            data() {
                return {
                    isShow:true,
                    brandList: api.pageParam.brandList
                }
            },
            created(){
            },
            mounted() {
            },
            methods: {
                selectBrand(it){
                    console.log(JSON.stringify(it));
                    api.sendEvent({
                        name: 'notice_brand_select',
                        extra: {brand:it}
                    });
                },
            },
        })
        api.addEventListener({
            name: 'showSearchPage'
        }, function(ret, err){
            var hidden = ret.value.isShow 
            if(hidden){
                vm.isShow = false
            }else{
                vm.isShow = true
            }
        });
    }
</script>
</body>

</html>
